home *** CD-ROM | disk | FTP | other *** search
/ Acorn User: China / Acorn User China CD-ROM (UK) (Disc A) / Acorn User China CD-ROM (UK) (Disc A).bin / HENSA / MISC / EXAMINE.ARC / !Examine_!ReadMe_ReadMe < prev    next >
Encoding:
Text File  |  1993-04-16  |  12.2 KB  |  502 lines

  1. ========================================================
  2.  
  3.   Wimp Application Support Program.
  4.  
  5.   SWI description for version 1.02 and above.
  6.  
  7.   All SWI's preserve all registers, except of course
  8.   for those that return data on exit.
  9.  
  10.   R0 will *only* be corrupted if an error occurred.
  11.   (R0 pointer to the error block, V flag set)
  12.  
  13. --------------------------------------------------------
  14.  
  15.   WASP_Workspace
  16.  
  17.   On exit  R0 = Pointer to WASP's workspace
  18.            R1 = Total amount of workspace
  19.  
  20.   Remarks  Any calls to WASP or even events like a
  21.            mode change will corrupt the workspace
  22.            Please bear in mind that you are probably
  23.            not the only application that uses WASP
  24.            Do NOT use this workspace from an interrupt
  25.            routine, only from within an application !
  26.  
  27. --------------------------------------------------------
  28.  
  29.   WASP_Initialise
  30.  
  31.   On entry R0 = Minimal Wimp version number * 100
  32.            R1 = Pointer to short description of task,
  33.                 for use in Task manager display
  34.  
  35.   On exit  R0 = Current Wimp version number * 100
  36.            R1 = Task handle
  37.  
  38. --------------------------------------------------------
  39.  
  40.   WASP_CloseDown
  41.  
  42.   On entry R0 = Task handle
  43.  
  44. --------------------------------------------------------
  45.  
  46.   WASP_OpenWindow
  47.  
  48.   On entry R0 = Window handle
  49.            R1 = On top of window stack or original
  50.                 position (true/false)
  51.            R2 = Centred or original screen position
  52.                 (true/false)
  53.  
  54. --------------------------------------------------------
  55.  
  56.   WASP_CloseWindow
  57.  
  58.   On entry R0 = Window handle
  59.  
  60. --------------------------------------------------------
  61.  
  62.   WASP_Select
  63.  
  64.   On entry R0 = Window handle
  65.            R1 = Icon handle
  66.            R2 = Selected (true/false)
  67.  
  68.   Remarks  Icon is updated
  69.  
  70. --------------------------------------------------------
  71.  
  72.   WASP_SelectState
  73.  
  74.   On entry R0 = Window handle
  75.            R1 = Icon handle
  76.  
  77.   On exit  R2 = Selected (true/false)
  78.  
  79. --------------------------------------------------------
  80.  
  81.   WASP_Shade
  82.  
  83.   On entry R0 = Pointer to menu block
  84.            R1 = Icon handle
  85.            R2 = Shaded (true/false)
  86.  
  87. --------------------------------------------------------
  88.  
  89.   WASP_ShadeState
  90.  
  91.   On entry R0 = Pointer to menu block
  92.            R1 = Icon handle
  93.  
  94.   On exit  R2 = Shaded (true/false)
  95.  
  96. --------------------------------------------------------
  97.  
  98.   WASP_Tick
  99.  
  100.   On entry R0 = Pointer to menu block
  101.            R1 = Icon handle
  102.            R2 = Ticked (true/false)
  103.  
  104. --------------------------------------------------------
  105.  
  106.   WASP_TickState
  107.  
  108.   On entry R0 = Pointer to menu block
  109.            R1 = Icon handle
  110.  
  111.   On exit  R2 = Ticked (true/false)
  112.  
  113. --------------------------------------------------------
  114.  
  115.   WASP_SetCaret
  116.  
  117.   On entry R0 = Window handle
  118.            R1 = Icon handle
  119.  
  120.   Remarks  The caret is placed at the rightmost of the
  121.            string contained in the icon
  122.  
  123. --------------------------------------------------------
  124.  
  125.   WASP_UpdateCaret
  126.  
  127.   On entry R0 = Task handle
  128.  
  129.   Remarks  If the caret is inside an icon owned by
  130.            this task it will be placed at the right
  131.            side of the string it contains (if any)
  132.  
  133. --------------------------------------------------------
  134.  
  135.   WASP_UpdateIcon
  136.  
  137.   On entry R0 = Window handle
  138.            R1 = Icon handle
  139.  
  140. --------------------------------------------------------
  141.  
  142.   WASP_UpdateTitle
  143.  
  144.   On entry R0 = Window handle
  145.  
  146. --------------------------------------------------------
  147.  
  148.   WASP_UpdateWindow
  149.  
  150.   On entry R0 = Window handle
  151.  
  152.   Remarks  Update is rather crude by closing and
  153.            re-opening the window if it was open
  154.  
  155. --------------------------------------------------------
  156.  
  157.   WASP_IconText
  158.  
  159.   On entry R0 = Window handle
  160.            R1 = Icon handle
  161.  
  162.   On exit  R0 = Pointer to icon text
  163.            R1 = Icon data is indirected (true/false)
  164.            R2 = Maximum length of string
  165.  
  166. --------------------------------------------------------
  167.  
  168.   WASP_SetIconText
  169.  
  170.   On entry R0 = Window handle
  171.            R1 = Icon handle
  172.            R2 = Pointer to icon text
  173.  
  174.   Remarks  Icon is updated but must be indirected
  175.            The caret (if present) is not updated
  176.  
  177. --------------------------------------------------------
  178.  
  179.   WASP_IconValid
  180.  
  181.   On entry R0 = Window handle
  182.            R1 = Icon handle
  183.  
  184.   On exit  R0 = Pointer to validation string
  185.  
  186. --------------------------------------------------------
  187.  
  188.   WASP_SetIconValid
  189.  
  190.   On entry R0 = Window handle
  191.            R1 = Icon handle
  192.            R2 = Pointer to validation string
  193.  
  194.   Remarks  The icon is updated
  195.  
  196. --------------------------------------------------------
  197.  
  198.   WASP_EntryText
  199.  
  200.   On entry R0 = Pointer to menu block
  201.            R1 = Icon handle
  202.  
  203.   On exit  R0 = Pointer to icon text
  204.            R1 = Indirected icon data (true/false)
  205.            R2 = Maximum length of string
  206.  
  207. --------------------------------------------------------
  208.  
  209.   WASP_SetEntryText
  210.  
  211.   On entry R0 = Pointer to menu block
  212.            R1 = Icon handle
  213.            R2 = Pointer to icon text
  214.  
  215. --------------------------------------------------------
  216.  
  217.   WASP_EntryValid
  218.  
  219.   On entry R0 = Pointer to menu block
  220.            R1 = Icon handle
  221.  
  222.   On exit  R0 = Pointer to validation string
  223.  
  224. --------------------------------------------------------
  225.  
  226.   WASP_SetEntryValid
  227.  
  228.   On entry R0 = Pointer to menu block
  229.            R1 = Icon handle
  230.            R2 = Pointer to validation string
  231.  
  232. --------------------------------------------------------
  233.  
  234.   WASP_WindowTitle
  235.  
  236.   On entry R0 = Window handle
  237.  
  238.   On exit  R0 = Pointer to window title
  239.            R1 = Window title is indirected (true/false)
  240.            R2 = Maximum length of string
  241.  
  242. --------------------------------------------------------
  243.  
  244.   WASP_SetWindowTitle
  245.  
  246.   On entry R0 = Window handle
  247.            R1 = Pointer to window title
  248.  
  249. --------------------------------------------------------
  250.  
  251.   WASP_CaretInfo
  252.  
  253.   On exit  R0=Window handle (-1 for none)
  254.            R1=Icon handle (-1 for none)
  255.            R2=X offset of caret relative to work area
  256.            R3=Y offset of caret relative to work area
  257.            R4=Height and flags (-1 if not displayed)
  258.            R5=Index into string (if in writeable icon)
  259.  
  260.  
  261. --------------------------------------------------------
  262.  
  263.   WASP_IconInfo
  264.  
  265.   On entry R0 = Window handle
  266.            R1 = Icon handle
  267.  
  268.   On exit  R0 = Minimum X coordinate of bounding box
  269.            R1 = Minimum Y coordinate of bounding box
  270.            R2 = Maximum X coordinate of bounding box
  271.            R3 = Maximum Y coordinate of bounding box
  272.            R4 = Icon flags
  273.            R5 = Icon data word 1
  274.            R6 = Icon data word 2
  275.            R7 = Icon data word 3
  276.  
  277. --------------------------------------------------------
  278.  
  279.   WASP_ModeInfo
  280.  
  281.   On exit  R0 = Maximum screen X coordinate
  282.            R1 = Maximum screen Y coordinate
  283.            R2 = X shift factor (e.g. 1 for mode 12)
  284.            R3 = Y shift factor (e.g. 2 for mode 12)
  285.            R4 = Mode flags
  286.            R5 = Number of colours (1,3,15 or 63)
  287.  
  288. --------------------------------------------------------
  289.  
  290.   WASP_PointerInfo
  291.  
  292.   On exit  R0 = Window handle
  293.            R1 = Icon handle
  294.            R2 = Mouse X position
  295.            R3 = Mouse Y position
  296.            R4 = Mouse button state
  297.  
  298. --------------------------------------------------------
  299.  
  300.   WASP_TaskInfo
  301.  
  302.   On entry R0 = Window handle
  303.            R1 = Icon handle
  304.  
  305.   On exit  R0 = Task handle of owner of window
  306.  
  307. --------------------------------------------------------
  308.  
  309.   WASP_WindowInfo
  310.  
  311.   On entry R0 = Window handle
  312.  
  313.   On exit  R0 = Visible area minimum X coordinate
  314.            R1 = Visible area minimum Y coordinate
  315.            R2 = Visible area maximum X coordinate
  316.            R3 = Visible area maximum Y coordinate
  317.            R4 = Scroll X offset relative to work area
  318.            R5 = Scroll Y offset relative to work area
  319.            R6 = Handle of window in front of this one
  320.            R7 = Window flags
  321.  
  322. --------------------------------------------------------
  323.  
  324.   WASP_LoadWindow
  325.  
  326.   On entry R0 = Pointer to window identifier
  327.            R1 = Pointer to sprite area control block
  328.                 (+1 for Wimp sprite area)
  329.            R2 = Pointer to workspace for indirected
  330.                 icons
  331.            R3 = Pointer to end of workspace
  332.            R4 = Pointer to 256-byte font reference
  333.                 array (-1 for no fonts)
  334.  
  335.   On exit  R0 = Window handle
  336.            R2 = Pointer to remaining workspace
  337.  
  338. --------------------------------------------------------
  339.  
  340.   WASP_LoadSprites
  341.  
  342.   On entry R0 = Pointer to pathname
  343.            R1 = Pointer to sprite area control block
  344.            R2 = Total size of sprite area
  345.  
  346. --------------------------------------------------------
  347.  
  348.   WASP_SetIconState
  349.  
  350.   On entry R0 = Window handle
  351.            R1 = Icon handle
  352.            R2 = EOR word
  353.            R3 = Clear word
  354.  
  355.   Remarks  Identical to Wimp_SetIconState, but this
  356.            call doesn't need a buffer block
  357.  
  358. --------------------------------------------------------
  359.  
  360.   WASP_SpriteOp
  361.  
  362.   On entry R0 = Reason code
  363.            R1 = Pointer to sprite area control block
  364.                 (+1 for Wimp sprite area)
  365.            Other registers as for OS_SpriteOp
  366.  
  367.   On exit  Registers returned as from OS_SpriteOp
  368.  
  369.   Remarks  R1 = 1 selects Wimp_SpriteOp
  370.            R1 <> 1 selects OS_SpriteOp
  371.  
  372. --------------------------------------------------------
  373.  
  374.   WASP_GCol
  375.  
  376.   On entry R0 = GCOL action, add 8 for background
  377.            R1 = Wimp colour
  378.  
  379. --------------------------------------------------------
  380.  
  381.   WASP_MemCopy
  382.  
  383.   On entry R0 = Pointer to source block
  384.            R1 = Pointer to destination block
  385.            R2 = Block size
  386.  
  387.   Remarks  Typical speeds on a standard (MEMC1) A310:
  388.  
  389.              Byte aligned approximately 3.0 Mb/second
  390.              Word aligned approximately 6.7 Mb/second
  391.  
  392. --------------------------------------------------------
  393.  
  394.   WASP_StringCopy
  395.  
  396.   On entry R0 = Pointer to source string
  397.            R1 = Pointer to destination string
  398.            R2 = Maximum string length to copy
  399.  
  400.   Remarks  String should be control terminated
  401.            It will first test if the string will fit,
  402.            only if this is true it will copy
  403.  
  404. --------------------------------------------------------
  405.  
  406.   WASP_StringLen
  407.  
  408.   On entry R0 = Pointer to string
  409.  
  410.   On exit  R0 = Length of string
  411.  
  412. --------------------------------------------------------
  413.  
  414.   WASP_LeafName
  415.  
  416.   On entry R0 = Pointer to string
  417.  
  418.   On exit  R0 = Pointer to leafname at end of string
  419.  
  420.   Remarks  The pointer returned is actually in the
  421.            original string itself
  422.  
  423. --------------------------------------------------------
  424.  
  425.   WASP_Iconbar
  426.  
  427.   On entry R0 = Pointer to spritename
  428.            R1 = Positioned left or right (true/false)
  429.  
  430.   On exit  R0 = Icon handle of iconbar icon
  431.  
  432.   Remarks  Sprite must be in the Wimp sprite area
  433.  
  434. --------------------------------------------------------
  435.  
  436.   WASP_DragIcon
  437.  
  438.   On entry R0 = Window handle
  439.            R1 = Icon handle
  440.            R2 = Mouse X coordinate
  441.            R3 = Mouse Y coordinate
  442.  
  443.   Remarks  Initiate a full screen type 5 Wimp_DragBox
  444.  
  445. --------------------------------------------------------
  446.  
  447.   WASP_BGet
  448.  
  449.   On entry R0 = File handle
  450.            R1 = Sequential file pointer
  451.  
  452.   On exit  R1 = Updated sequential file pointer
  453.            R2 = Byte read from file
  454.  
  455. --------------------------------------------------------
  456.  
  457.   WASP_BPut
  458.  
  459.   On entry R0 = File handle
  460.            R1 = Sequential file pointer
  461.            R2 = Byte to put in file
  462.  
  463.   On exit  R1 = Updated sequential file pointer
  464.  
  465. --------------------------------------------------------
  466.  
  467.   WASP_SGet
  468.  
  469.   On entry R0 = File handle
  470.            R1 = Sequential file pointer
  471.  
  472.   On exit  R1 = Updated sequential file pointer
  473.            R2 = Pointer to string read from file
  474.  
  475. --------------------------------------------------------
  476.  
  477.   WASP_SPut
  478.  
  479.   On entry R0 = File handle
  480.            R1 = Sequential file pointer
  481.            R2 = Pointer to string to put in file
  482.  
  483.   On exit  R1 = Updated sequential file pointer
  484.  
  485. ========================================================
  486.  
  487.   This application is freeware. You may copy it freely
  488.   but only when you copy this application and all it's
  489.   related data files completely without omissions and
  490.   you do not gain any financial profit from doing so.
  491.  
  492.   If you have any comments or suggestions about this
  493.   program, please contact the author as :
  494.  
  495.   Jan-Herman Buining
  496.   Brahmslaan 11c
  497.   5654 NW Eindhoven
  498.   Tel.: (0)40 512816
  499.   The Netherlands
  500.  
  501. ========================================================
  502.